<div class="row wrapper border-bottom white-bg page-heading">
  <div class="col-lg-10">
    <h2>角色管理</h2>
    <ol class="breadcrumb">
      <li class="breadcrumb-item">
        <a href="/#/home">主页</a>
      </li>
      <li class="breadcrumb-item">
        <a>管理</a>
      </li>
      <li class="breadcrumb-item active">
        <strong>角色管理</strong>
      </li>
    </ol>
  </div>
  <div class="col-lg-2">

  </div>
</div>
<div class="wrapper wrapper-content animated fadeInRight">
  <div class="row">
    <div class="col-lg-12">
      <div class="ibox ">
        <div class="ibox-title">
          <h5>角色列表</h5>
          <app-iboxtools></app-iboxtools>
        </div>
        <div class="ibox-content">
          <table class="table table-bordered table-hover table-striped">
            <thead>
            <tr>
              <th class="text-center">ID</th>
              <th class="text-center">角色名</th>
              <th class="text-center">描述</th>
              <th class="text-center">创建者</th>
              <th class="text-center">状态</th>
              <th class="text-center">操作</th>
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let role of roles">
              <td class="text-center">{{role.id}}</td>
              <td class="text-center">{{role.name}}</td>
              <td class="text-center">{{role.description}}</td>
              <td class="text-center">{{role.creator}}</td>
              <td class="text-center" [ngSwitch]="role.status">
                <p *ngSwitchCase="1" class="text-primary">正常</p>
                <p *ngSwitchCase="0" class="text-danger">关闭</p>
              </td>
              <td class="text-center">
                <button type="button" class="btn btn-sm btn-primary" (click)="openModalWithComponent(role)" title="编辑">
                  <i
                    class="fa fa-edit"></i> 编辑
                </button>
                <button type="button" class="btn btn-danger btn-sm" data-toggle="tooltip" (click)="delete(role)"
                        title="删除"><i
                  class="fa fa-trash-o"></i> 删除
                </button>
              </td>
            </tr>
            </tbody>
          </table>
        </div>
      </div>
    </div>
  </div>
</div>

